<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字点击可编辑</title>
    <script src="clickEdit.js"></script>
</head>
<body>

<div class="edit">点击后可编辑的文字</div>

<script>
    new clickEdit('edit', {
        backgroundColor: '#eee',
        callback: function (value, element) {
            console.log(value);
            console.log(element);
        },
    });
</script>
</body>
</html>